package com.itfreer.data.sqlite;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.itfreer.data.general.ConnectionInfo;

/**
 * 定义数据库辅助类
 */
public class DatabaseHelper extends SQLiteOpenHelper {

    private static final String name = "count"; //数据库名称
    private static final int version = 1; //数据库版本

    public DatabaseHelper(Context context, ConnectionInfo cInfo) {
        // 第三个参数CursorFactory指定在执行查询时获得一个游标实例的工厂类,
        // 设置为null,代表使用系统默认的工厂类
        super(context, cInfo.getDatabase(), null, cInfo.getVersion());
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    }
}